
A PSearch node can be used for many advanced effects that need to find
the nearest or furthest particle within a search range. Thanks to the
many outputs this Node has to offer, all important data can be collected
to create advanced effects. Check out the simple example at the end of
this page to learn how to use this Node.
ON - (Bool) This input data
stream determines whether the operator is considered 'on' or 'off'. You
can connect other operators to this input channel such as a Bool
Helper to activate/deactivate the whole operator.
Time - (Time) This input data stream is used to define the local
time for the operator when the user wants to override the default system
time.
Particle - (Particle) is an input port to supply the position
information a particle carries, to this Node.
Position - (Position) feed in a position value to specify a world
space position for this Node. This position will be used to search for
the nearest or furthest particle.
Group - (Integer) specifies the Group to be used by this Node
Use SubTree - (Bool) when active the full Particle Group Hierarchy
will be used to search for particles near the Position
Radius - (Scalar) sets the Radius to search for a nearest particle
Nearest PID - (Particle)
outputs the nearest Particle found from the supplied Position.
Nearest Distance - (Distance )supplies the nearest Distance value
form the supplied position.
Furthest PID - (Particle) supplies the furthest particle ID as
it was found in within the search radius.
*Furthest Distance - (Distance) outputs the furthest distance
value for furthest particle found within the search radius
Found PIDs - (Particle) outputs all particles found within the
search radius. This output will iterate through all particles found .
Found Distances - (Distance) supplies all distances from found
particles within the search radius searched from the supplied position.
Found Indexes - (Integer) outputs the current index of the particle
that are within the search radius, searched from the position supplied
.
Found Count - (Integer) holds the total amount of particles found
within the search radius.
Found Density - (Scalar) outputs the denisty of particles within
the search radius. This number is calculated by dividing the total amount
of particles by the radius.
Found Average Position - (Position) supplies the average position
of all particles found within the search radius.
Found Average Velocity - (Velocity) outputs the average velocity
of all particles found within the search radius

Group - lets you select the particle group to search for the nearest
or furthest particle within a radius
Use SubTree - when checked, the full Hierarchical particle group
structure will be used to search for the nearest or furthest particle
within a radius.
Radius - specifies the search radius to search for around the
supplied position

In the example above, the PSearch node is used to find the nearest particle
and then the particle is sent towards the position of the nearest particle.
A Threshold node stops the particle 20 unites before the target is reached.